home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-11 / rlib.zip / RL_ALPHA.PRG < prev    next >
Text File  |  1993-01-04  |  601b  |  20 lines

  1. * Function: ALPHADATE
  2. * Author..: Richard Low
  3. * Syntax..: ALPHADATE( [<expD>] )
  4. * Returns.: Date variable as character string in the form: January 1, 1986
  5. *
  6.  
  7. FUNCTION ALPHADATE
  8.  
  9. PARAMETERS rl_date
  10.  
  11. *-- verify parameter exists and/or is a date type variable
  12. IF .NOT. TYPE('rl_date') = 'D'                            
  13.    *-- if not date type, or undefined, default to system date
  14.    rl_date = DATE()
  15. ENDIF
  16.  
  17. *-- return character string of the: Month + space + Day + comma + Year
  18. RETURN ( CMONTH(rl_date) + ' ' + LTRIM(STR(DAY(rl_date),2,0)) + ', '+;
  19.          STR(YEAR(rl_date),4,0) )
  20.